Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.naming
Class HierarchicalCatalog<V>

    java.lang.Object
      rdlc.naming.Catalog<java.lang.String,V>
          rdlc.naming.HierarchicalCatalog<V>

Direct Known Subclasses:
  Instance, Namespace

    public class HierarchicalCatalog<V>

extends Catalog<java.lang.String,V>

This class extends the functionality of a `Catalog` to include functions for managing a hierarchy of catalogs. This adds a number of functions such as `getParent()`, `getRoot()` as well as identifiers and accessors.

Version:
  $Revision: 1.7 $
Author:
  Greg Gibeling

Nested Class Summary
`protected static class` | `HierarchicalCatalog.DefaultAccessor<_V>` This is the default accessor class for hierarchical catalogs which are not extended.

Field Summary
`protected Identifier<V>` | `cachedIdentifier` The identifier which names this catalog.
`protected HierarchicalCatalog<V>` | `cachedRoot` The root of this hierarchy.
`protected java.lang.String` | `name` The string name of this catalog, as bound in it's parent catalog.
`protected HierarchicalCatalog<V>` | `parent` The parent catalog in which this catalog's name is bound.

Fields inherited from class rdlc.naming.Catalog
`entryList, indexTable`

Constructor Summary
`HierarchicalCatalog(java.lang.String _name, HierarchicalCatalog<V> _parent)` Base constructor, creates a hierarchical catalog with the given name, and in the given parent catalog.

Method Summary
`protected void` | `connectParent()` Connect this catalog to it's parent, by binding it's name in the parent catalog.
`Identifier<V>` | `getIdentifier()` Simple accessor.
`java.lang.String` | `getName()` Simple accessor.
`HierarchicalCatalog<V>` | `getParent()` Simple accessor.
`HierarchicalCatalog<V>` | `getRoot()` Get the root catalog in this hierarchy.
`int` | `hashCode()` Simple accessor.

Methods inherited from class rdlc.naming.Catalog
`clear, containsKey, entryList, get, get, getKey, isEmpty, keySet, put, put, putAll, remove, size`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### name

    protected java.lang.String name

  The string name of this catalog, as bound in it's parent catalog.

### parent

    protected HierarchicalCatalog<V> parent

  The parent catalog in which this catalog's name is bound. `null` in a root catalog.

### cachedRoot

    protected HierarchicalCatalog<V> cachedRoot

  The root of this hierarchy. This assumes a static hierarchy. Kept to avoid the actual recursive call.

### cachedIdentifier

    protected Identifier<V> cachedIdentifier

  The identifier which names this catalog. Cached to avoid recreating this identifier each time it is needed.

Constructor Detail

### HierarchicalCatalog

    public HierarchicalCatalog(java.lang.String _name,
                               HierarchicalCatalog<V> _parent)

  Base constructor, creates a hierarchical catalog with the given name, and in the given parent catalog. Notice that this DOES NOT bind this catalog's name in it's parent catalog, that is the responsibility of the caller.

  Parameters:
    `_name` - The name of this catalog.
    `_parent` - The parent catalog. Might be `null`.

Method Detail

### hashCode

    public int hashCode()

  Simple accessor.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    Simple hash function of the name and location of this catalog.

### connectParent

    protected void connectParent()

  Connect this catalog to it's parent, by binding it's name in the parent catalog. This will only be used by classes which extend this one. Notice that if the actual catalogs involved aren't subtypes of V (the type parameter for this class) then this method will involve an exception and an error.

### getRoot

    public HierarchicalCatalog<V> getRoot()

  Get the root catalog in this hierarchy. This is implemented recursively but it does cache the result to speed up the next call.

  Returns:
    The root catalog in this hierarchy.

### getParent

    public HierarchicalCatalog<V> getParent()

  Simple accessor.

  Returns:
    This catalog's parent. `null` if this is the root.

### getName

    public java.lang.String getName()

  Simple accessor.

  Returns:
    The name of this catalog as bound in it's parent catalog.
  See Also:
    `getParent()`

### getIdentifier

    public Identifier<V> getIdentifier()

  Simple accessor.

  Returns:
    An indetifier which names this catalog.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD